﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace EventBus.Abstractions
{
    public interface IEventHandlerExecutionContext
    {
        void RegisteEventHandler<TEvent, TEventHandler>()
            where TEvent:IEvent
            where TEventHandler:IEventHandler;

        bool IsRegisteEventHandler<TEvent, TEventHandler>()
            where TEvent : IEvent
            where TEventHandler : IEventHandler;

        Task<bool> HandleAsync<TEvent>(TEvent @event)
            where TEvent:IEvent;
    }
}
